<?php

namespace Admin\Services;

/**
 * Description of Service
 *
 * @author nofear
 */
class Deleter extends Service {
    
    public function deleteSogi($id) {
        $SOGI = $this->EntityManager->find('Shared\Multimedia\SiteObjectGalleryItem', $id);
        
        if ($SOGI) {
            $this->EntityManager->remove($SOGI);
            $this->EntityManager->flush();
        }
        
        $this->redirect($this->Request->headers->get('referer'));
    }
}
